(()=>{

    // 类

    class Person {
        // 定义属性
        name:string
        age:number
        gender: string
        
        constructor(name:string, age:number, gender:string) {
            this.name = name 
            this.age = age
            this.gender = gender
        }


        sayHi(str: String):void {
            console.log(`大家好，我是 ${this.name}, 今年 ${this.age}, 是个 ${this.gender}`)
        }
    }

    const person = new Person('路飞', 12, '男')
    person.sayHi('123')

})()